package bknc.sgolf.db;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBConnection {
  public static void main(String[] args) throws Exception {
    Connection conn = null;

    conn = getConnection("jdbc:mysql://localhost/bknc_sgolf", "root", "root");

    conn.close();
  }

  public static Connection getConnection(String dbURL, String user, String password)
      throws SQLException, ClassNotFoundException {
    Class.forName("com.mysql.jdbc.Driver");
    return DriverManager.getConnection(dbURL, user, password);
  }

}